package com.yunang.oa.service.impl;

import com.yunang.oa.entity.OaTask;
import com.yunang.oa.mapper.OaTaskMapper;
import com.yunang.oa.service.OaTaskService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OaTaskServiceImpl implements OaTaskService {

    private final OaTaskMapper oaTaskMapper;

    @Autowired
    public OaTaskServiceImpl(OaTaskMapper oaTaskMapper){
        this.oaTaskMapper = oaTaskMapper;
    }


    @Override
    public List<OaTask> getOaTaskList(){

        return oaTaskMapper.getOaTaskList();
    }


    @Override
    public OaTask getOaTaskById(Long id) {
        return oaTaskMapper.getOaTaskById(id);
    }



    public Integer insertOaTask(OaTask task){

        return oaTaskMapper.insertOaTask(task);
    }

    @Override
    public List<OaTask> getOaTaskListByReceiver(Long taskReceiver) {
        return oaTaskMapper.getOaTaskListByReceiver(taskReceiver);
    }

    @Override
    public List<OaTask> getOaTaskListByStatus(Integer status) {
        return oaTaskMapper.getOaTaskListByStatus(status);
    }
}
